package cn.wyl.org.mapper;

import cn.wyl.org.domain.Shop;
import cn.wyl.basic.mapper.BaseMapper;
import cn.wyl.org.dto.ShopDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Tom
 * @since 2022-11-01
 */
public interface ShopMapper extends BaseMapper<Shop> {

    /**
     * 由店铺名称和地址查询店铺
     * @param shop
     * @return
     */
    Shop findByNameAndAddress(Shop shop);

    /**
     *
     * @param shopId
     * @param i
     */
    void updateState(@Param("id") Long shopId, @Param("state") int i);

    /**
     * 查询每一种状态的数量
     * @return
     */
    List<ShopDto> echarts();
}
